package com.ithema.service.impl;

import com.ithema.dao.ProductDao;
import com.ithema.domain.Product;
import com.ithema.service.ProductService;
import com.ithema.util.JsonConverter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description
 * @Author wangyu
 * @Date 2021/10/31
 */
@Slf4j
@Service
public class ProductServiceImpl implements ProductService, JsonConverter {

    @Autowired
    private ProductDao productDao;

    @Override
    public Product findByPid(Integer pid) {
        return productDao.findById(pid).get();
    }
}
